package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    int deleteByPrimaryKey(Integer id);

    Integer inserts(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByUid(String uid);

    List<User> selectAll(@Param("begin")int begin, @Param("limit")int limit);

    int selectAllCount();

    List<User> selectByExample(@Param("begin")int begin,
                               @Param("limit")int limit,
                               @Param("example")User example);

    User selectByUidPwd(@Param("uid")String uid,
                        @Param("pwd")String pwd);

    int selectByExampleCount(@Param("example")User example);

}
